-- pays sp -> es

select * from countries

insert into countries(idcountry, [enabled], idlanguage)
values('es', 1, null)

update users set IdCountry = 'es' where IdCountry = 'sp'

update Languages set PreferedCountry = 'es' where PreferedCountry= 'sp'

delete from countries where IdCountry = 'sp'

-- langues sp -> es

insert into languages(IdLanguage, PreferedCountry)
values('es', 'es')

update UsersLearnLanguages set IdLanguage = 'es' where idLanguage = 'sp'

update [dbo].[UsersSpokenLanguages] set IdLanguage = 'es' where idLanguage = 'sp'

delete from languages where IdLanguage = 'sp'


